package com.ciwong.epaper.modules.msg.ui;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import com.ciwong.epaper.R;
import com.ciwong.epaper.application.EpaperConstant;
import com.ciwong.epaper.modules.msg.util.MessageJumpManager;
import com.ciwong.libs.utils.CWLog;

import org.json.JSONException;
import org.json.JSONObject;


public class MyReceiver extends BroadcastReceiver {
    private static final String TAG = "MyReceiver";
    private int count = 1;
    private  long mMsgId=0;
    private static String mMessageId;
    private static String mLastMessageId;

    @Override
    public void onReceive(Context context, Intent intent) {
        Bundle bundle = intent.getExtras();


        CWLog.d(TAG, "[PushReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
        mLastMessageId  = mMessageId;
    }

    /**
     * 打印所有的 intent extra 数据
     */
    private  String printBundle(Bundle bundle) {
        StringBuilder sb = new StringBuilder();
        return sb.toString();
    }
}
